home *** CD-ROM | disk | FTP | other *** search
- property pIngredient, pOrigIngredient, pDraggingMember, pSpr, pTimer
- global gWellSprite
-
- on beginSprite me
- pSpr = sprite(me.spriteNum)
- pOrigMember = pSpr.member
- pOrigIngredient = pIngredient
- pDraggingMember = nextMember(pOrigMember)
- end
-
- on mPickMeUp me, newIngredient, pickupLoc
- replaceDraggingAnything()
- returnToBar(VOID, 1)
- if not voidp(newIngredient) then
- pIngredient = newIngredient
- end if
- sendSprite(gWellSprite, #mDragWellItem, pSpr, pDraggingMember, VOID, pIngredient)
- end
-
- on rightMouseDown me
- if the stage = the activeWindow then
- pIngredient = twistIt(pOrigIngredient)
- showToolTip(pSpr, checkForTwist(pIngredient))
- mPickMeUp(me, pIngredient)
- end if
- end
-
- on mouseUp
- if the doubleClick and isLemonOrLime(pOrigIngredient) then
- pIngredient = twistIt(pOrigIngredient)
- showToolTip(pSpr, pIngredient)
- end if
- end
-
- on mouseDown me
- pIngredient = pOrigIngredient
- if the doubleClick then
- exit
- end if
- if draggingAnything() then
- replaceDraggingAnything()
- else
- if modifierDown() and isLemonOrLime(pOrigIngredient) then
- pIngredient = twistIt(pOrigIngredient)
- showToolTip(pSpr, pIngredient)
- end if
- menuDown = nowTicks()
- repeat while the stillDown
- if ticksSince(menuDown) > 45 then
- pIngredient = twistIt(pOrigIngredient)
- end if
- if ticksSince(menuDown) > 15 then
- forceToolTip(pSpr, checkForTwist(pIngredient), the clickLoc)
- end if
- checkElapsedTime()
- updateStage()
- end repeat
- showToolTip(pSpr, checkForTwist(pIngredient))
- mPickMeUp(me, pIngredient)
- end if
- end
-
- on mDoneDragging me
- global gBarTopManager, gSoundFXchan, gLastIngredient, gTwistTips
- if inBonusMode() then
- storeLastIngredient(checkForTwist(pIngredient))
- if not dropWellItemInBonusRound(gLastIngredient) then
- gLastIngredient = 0
- end if
- exit
- end if
- barGlass = overGarnishableItem(me)
- if barGlass then
- barSlot = glassSpriteToBarSlot(barGlass)
- glassType = getBarTopGlass(gBarTopManager, barSlot)
- startGlass = glassPrefix(glassType) & "_"
- pIngredient = checkForTwist(pIngredient)
- if isTwist(pIngredient) then
- garnishedGlass = startGlass & "twist"
- gTwistTips = 0
- else
- garnishedGlass = startGlass & pIngredient
- end if
- setBarTopGlass(gBarTopManager, barSlot, member(garnishedGlass), glassType, 1, VOID, pIngredient)
- clickSound()
- else
- alertBeep()
- end if
- end
-
- on overGarnishableItem me
- garnishableList = [79, 83, 87, 81, 85, 89]
- repeat with X in garnishableList
- if sendSprite(X, #mOverItem, pSpr, the mouseLoc, pIngredient) then
- if (X = 89) or (X = 85) or (X = 81) then
- return X - 2
- next repeat
- end if
- return X
- end if
- end repeat
- return 0
- end
-
- on getPropertyDescriptionList me
- wellList = [#olive, #lemonWedge, #limeWedge, #cherry, #orangeWedge, #salt]
- myList = [#pIngredient: [#default: #olive, #format: #symbol, #comment: "Infinite supply of:", #range: wellList]]
- return myList
- end
-
- on mouseEnter me
- pIngredient = pOrigIngredient
- if not draggingAnything() then
- pTimer = nowTicks()
- showToolTip(pSpr, checkForTwist(pIngredient))
- end if
- end
-
- on mouseLeave me
- if not draggingAnything() then
- hideToolTip()
- end if
- end
-
- on mouseWithin me
- if not draggingAnything() then
- showToolTip(pSpr, checkForTwist(pIngredient))
- end if
- if draggingAnything() then
- else
- if tipTickRange(pTimer) then
- forceToolTip(pSpr, checkForTwist(pIngredient))
- else
- dismissToolTip()
- end if
- end if
- end
-